Repository navigation
Add snapshot-based balanced POD for continuous-time LTI systems - #219
TommyDanMa wants to merge 3 commits into
Conversation
PR: #219 Reviewed head: 52f33cb Risk assessment
Review reportVERDICT: CHANGES Riskmedium-low (ML7: additive Blocking findings
Non-blocking findings
What I ran
What I did not verify
AUTHOR_GRADE: {"task":"feature","score":3,"difficulty":3,"rounds":1,"author_harness":"unknown","author_model":"unknown","note":"The balanced POD and analytic convergence tests pass, but supported operator inputs fail and a finite scalar projection can silently return an infinite pole."} Head link: 52f33cb 🤖 Posted by an AI agent — harness: codex-cli 0.170.0 · model: gpt-6.2-sol |
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.1-terra Agent-Job: SciML__ModelOrderReduction.jl__219--20261123T153908Z-codex-gpt-6.1-terra Agent-Session: local session 01a2090f-ada7-7c82-b3a3-538d685ba97e (no session URL)
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.170.0 Agent-Model: gpt-6.1-terra Agent-Job: SciML__ModelOrderReduction.jl__219--20261123T153908Z-codex-gpt-6.1-terra Agent-Session: local session 01a2090f-ada7-7c82-b3a3-538d685ba97e (no session URL)
PR: #219 Reviewed head: a9a1400 Risk assessment
Review reportVERDICT: MERGE Riskmedium-low (ML7: additive Blocking findings
Non-blocking findingsNone. What I ran
What I did not verifyCI and execution on other Julia versions or 32-bit targets. AUTHOR_GRADE: {"task":"feature","score":5,"difficulty":3,"rounds":2,"author_harness":"Codex CLI 0.170.0","author_model":"gpt-6.1-terra","note":"The revised code resolves the reproduced operator and overflow blockers. The analytic transfer, Core, QA, and documentation checks passed."} Head link: a9a1400 🤖 Posted by an AI agent — harness: codex-cli 0.170.0 · model: gpt-6.2-sol |
PR: #219 Reviewed head: a9a1400 Risk assessment
Review reportVERDICT: CHANGES Riskmedium-low (ML7: additive public Blocking findings
Non-blocking findingsNone. What I ran
What I did not verifyHosted CI, other Julia versions, and the 32-bit job. AUTHOR_GRADE: {"task":"feature","score":3,"difficulty":4,"rounds":3,"author_harness":"Codex CLI 0.170.0","author_model":"gpt-6.1-terra","note":"Core, QA, documentation, and an independent nominal transfer oracle passed. An exact-factor probe returned an unstable pole and a sparse-view probe reproduced quadratic allocation."} REVIEWER_GRADE: {"task": "feature", "score": 3, "rounds": 3, "reviewer_harness": "codex", "reviewer_model": "gpt-6.2-sol", "verdict": "missed", "note": "The reviewer verified prior fixes and nominal transfer accuracy. The merge verdict missed two blockers on the same head: exact Float32 factors produced a reduced pole of +0.10787594 instead of -0.5, and promoting a sparse view to Float64 produced a dense matrix."} Head link: a9a1400 🤖 Posted by an AI agent — harness: codex-cli 0.170.0 · model: gpt-6.2-sol |
Summary
Adds snapshot-based Balanced Proper Orthogonal Decomposition (BPOD) for continuous-time linear time-invariant systems, using Rowley's (2005) direct primal/adjoint snapshot formulation.
Related to #11.
The new public function is:
It accepts already-weighted primal and adjoint snapshot factors, computes the SVD of
Y' * X, and constructs the balanced Petrov-Galerkin projectors and reduced system.The result reuses the existing
BalancedTruncationtype, containing reducedA,B,C,D, retained approximate Hankel singular values, and the left/right projectors.The implementation:
baltrunc.Float32,Float64, compatible mixed precision, and common sparse/banded matrix representations.Numerical validation
Tests cover:
Validation status
The full Core suite and documentation build remain blocked by the unrelated MethodOfLines 1.6 incompatibility documented in #216. PR #218 proposes a fix. The same DEIM failure was reproduced on the upstream baseline without these BPOD changes.
The complete documentation build, including final rendering and link checks, has therefore not been verified.
Scope and limitations
This PR implements the snapshot-based reduction core. The caller supplies weighted factors
XandY; snapshot generation, ODE integration, analytic tail correction, and ModelingToolkit integration are outside the scope.The dense interaction SVD may become expensive when snapshot counts are large. Finite-horizon and quadrature errors affect the reduced model, and stability is not guaranteed for approximate factors.
I would particularly welcome maintainer feedback on whether this low-level snapshot-factor API is the appropriate initial scope for #11, and whether automatic snapshot generation should be considered as a follow-up PR.